#ifndef __ODOMETER_H_
#define __ODOMETER_H_

#include "common.h"
#include <pthread.h>

typedef struct
{
	uint8_t dual;	        	//机器人所在段号，由摄像头识别红点决定
    int32_t plus;               //机器人累计脉冲计数
	uint32_t dist_to_radpoint;	//距离段点（红点）的距离
    pthread_mutex_t odom_lock;  //互斥锁
	
}ROBOT_POSITION;    


//extern ROBOT_POSITION  robot_position;

void robot_position_updata(int32_t step_postion);

//读写接口
ROBOT_POSITION *read_odom(ROBOT_POSITION *position);
void write_odom(uint8_t dual, int32_t distance);


#endif